package com.ubireality.module.patronus;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.ubireality.module.basic.BaseEntity;

@Entity
public class Bestiary_Patron extends BaseEntity {
	@Temporal(TemporalType.TIMESTAMP)
	// this is the default type
	private Date timeOfRelease;
	@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	// remove from bestiary then remove the patron entity
	private Patron patron;
	@ManyToOne
	private Bestiary belongToBestiary;

	public Date getTimeOfRelease() {
		return timeOfRelease;
	}

	public void setTimeOfRelease(Date timeOfRelease) {
		this.timeOfRelease = timeOfRelease;
	}

	public Patron getPatron() {
		return patron;
	}

	public void setPatron(Patron patron) {
		this.patron = patron;
	}

	public Bestiary getBelongToBestiary() {
		return belongToBestiary;
	}

	public void setBelongToBestiary(Bestiary belongToBestiary) {
		this.belongToBestiary = belongToBestiary;
	}

}
